<template xmlns:el-col="http://www.w3.org/1999/html">
    <el-form ref="foreModelForm" :rules="foreModelFormRules" :model="foreModelForm" label-width="200px">
        <el-form-item label="Ashworth评估" prop="assAshworth" >
            <el-radio-group v-model="foreModelForm.assAshworth" style="width: 40%">
                <el-radio :label="'00'" style="margin-top: 30px">0级：正常肌张力</el-radio>
                <el-radio :label="'01'" style="margin-top: 20px">1级：肌张力略微增加:受累部分被动屈伸时，在关节活动范围之末时呈现最小的阻力，或出现突然卡住和突然释放</el-radio>
                <el-radio :label="'02'" style="margin-top: 20px">1+级：肌张力轻度增加，在关节活动后50%范围内出现突然卡住，然后在关节活动范围后50%均呈现最小阻力</el-radio>
                <el-radio :label="'03'" style="margin-top: 20px">2级：肌张力较明显地增加，通过关节活动范围的大部分时，肌张力均较明显地增加，但受累部分仍能较容易地被移动</el-radio>
                <el-radio :label="'04'" style="margin-top: 20px">3级：肌张力严重增加，被动活动困难</el-radio>
                <el-radio :label="'05'" style="margin-top: 20px">4级：僵直，受累部分被动屈伸时呈现僵直状态，不能活动</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-button  style="margin-left: 240px;margin-top: 10px" type="primary" v-on:click="save">保 存</el-button>
    </el-form>
</template>

<script>
    export default {
        name: 'patient',
        data() {
            return {
                foreModelForm:{
                },
                foreModelFormRules:{
                    assAshworth: [
                        { required: true, message: '请选择Brunstrom评估', trigger: 'blur' },
                    ],
                }
            }
        },
        props:['name'],
        methods: {
            save:function () {
                this.$refs['foreModelForm'].validate((valid) => {
                    if (valid) {
                        this.foreModelForm.name = this.name;
                        console.log("this.foreModelForm--",this.foreModelForm);
                        this.$emit('assessformData', this.foreModelForm);
                        this.$message.success("保存成功");
                    }
                });
            }
        },
        watch:{     //监听value的变化，进行相应的操作即可
            name: function(a,b){     //a是value的新值，b是旧值
                this.name=a;
            }
        }
    };
</script>
<style scoped>
</style>
